package com.alibaba.utils;

import lombok.Getter;

public enum ErrorCode {

    SUCCESS(1000, "操作成功"),
    PARAM_IS_NULL(2001, "参数为空"),
    PARAM_INVALID(2002, "参数格式错误"),
    UNAUTHORIZED(3001, "用户未登录"),
    FORBIDDEN(3002, "权限不足"),
    NOT_FOUND(4001, "资源不存在"),
    CONFLICT(4002, "业务状态冲突"),
    SYSTEM_ERROR(5001, "系统异常");

    @Getter
    private final Integer code;

    @Getter
    private final String msg;

    ErrorCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
